<%--
  Created by IntelliJ IDEA.
  User: admin
  Date: 2020/5/2
  Time: 14:24
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
  <title>软件测试工程师管理系统 - 登录</title>
  <link rel="stylesheet" type="text/css" href="css\style_login.css" charset="utf-8">
  <link rel="stylesheet" type="text/css" href="css\style_checkbox_radio.css" charset="utf-8">
</head>
<body>
<%
  if(session.getAttribute("user") != null)
  {
    session.setAttribute("user", null);
  }
%>
<div class="container" id="container">
  <div class="form-container sign-up-container">
    <form action="#">
      <h1>注  册</h1><br>
      <input type="username" placeholder="用户名" disabled="disabled"/>
      <input type="email" placeholder="邮箱" disabled="disabled"/>
      <input type="password" placeholder="密码" disabled="disabled"/>

      <br><div class="opt">
      <input class="magic-checkbox" type="checkbox" name="layout" id="c1">
      <label for="c1"><a>未开放注册，请和管理员联系！</a></label>
    </div><br>
      <button><a>注  册</a></button>
    </form>
  </div>
  <div class="form-container sign-in-container">
    <form action = "UserLogin" method = "post" name = "form">
      <h1>登  录</h1><br>
      <input  type = "text" name = "name" id = "name" placeholder="用户名" autocomplete="off"/>
      <input type = "password" name = "pass" id= "pass" placeholder="密码" /><br>
      <button id="btnLogin"  type="button" onclick="jump()"><a>登  录</a></button>
<%--      <%--%>
<%--        if(request.getAttribute("msg")!=null){--%>
<%--          System.out.println(request.getAttribute("msg"));--%>
<%--        }--%>
<%--      %>--%>
      <script>
        function jump()
        {
          if ( document.getElementById("name").value==""||document.getElementById("pass").value=="")
          {
            window.alert('请输入用户名或密码！');
            return false;
          }
          else
          {
            form.submit();
          }

        }
      </script>
    </form>
  </div>
  <div class="overlay-container">
    <div class="overlay">
      <div class="overlay-panel overlay-left">
        <h1>欢迎回来！</h1>
        <p>请登录账号进行更多操作。</p>
        <button class="ghost" id="signIn" ><a>登  录</a></button>
      </div>
      <div class="overlay-panel overlay-right">
        <h1>没有账号？</h1>
        <p>快点击我注册成为会员吧！</p>
        <button class="ghost" id="signUp"><a>注  册</a></button>
      </div>
    </div>
  </div>
</div>
<script src="js/login.js"></script>
</body>
</html>
